home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
macros
/
latex209
/
contrib
/
misc
/
ifthen-addi.sty
< prev
next >
Wrap
Text File
|
1993-01-11
|
817b
|
23 lines
%
% small extension for ifthen style -- TeX \newif's
%
% e.g., \ifthen{\boolean{@twoside}}{}{}
%
\def\boolean#1{1=1\fi\noexpand\csname if#1\endcsname\def\noexpand\@tempa{1=1}%
\else\def\noexpand\@tempa{1=0}\fi\ifnum\noexpand\@tempa}
%
%
%
% \ifthenelse{\dimenequal{10pt}{20pt}}{}{} like #1 = #2
% \ifthenelse{\dimenless{10pt}{20pt}}{}{} like #1 < #2
% \ifthenelse{\dimengreater{10pt}{20pt}}{}{} like #1 > #2
%
\def\dimenequal#1#2{1=1\fi\noexpand\ifdim #1=#2 \def\noexpand\@tempa{1=1}
\else\def\noexpand\@tempa{1=0}\fi\ifnum\noexpand\@tempa}
%
\def\dimenless#1#2{1=1\fi\noexpand\ifdim #1<#2 \def\noexpand\@tempa{1=1}
\else\def\noexpand\@tempa{1=0}\fi\ifnum\noexpand\@tempa}
%
\def\dimengreater#1#2{1=1\fi\noexpand\ifdim #1>#2 \def\noexpand\@tempa{1=1}
\else\def\noexpand\@tempa{1=0}\fi\ifnum\noexpand\@tempa}